Democratic Lt. Gov. Ralph Northam has defeated Republican Ed Gillespie to win the Virginia governor`s race.